package com.tianma.upload.uploadjartest.builder.demo01;

/**
 * @author lgc
 * @createDate 2020/8/13 - 9:34
 */
public class Worker extends Builder{
    private Product product;

    public Worker() {
        this.product = new Product();
    }

    @Override
    String build1() {
        product.setBuild1("打地基");
        System.out.println("打地基");
        return "打地基";
    }

    @Override
    String build2() {
        product.setBuild2("铺水泥");
        System.out.println("铺水泥");
        return "铺水泥";
    }

    @Override
    String build3() {
        product.setBuild3("铺电线");
        System.out.println("铺电线");
        return "铺电线";
    }

    @Override
    Product getProduct() {
        return product;
    }
}
